package cate.game.res.holy_pet.core;

import cate.game.db.mongo.kv.KvMongo;
import cate.game.role.res.holy_pet.core.HolyPetAdventureLog;
import easy.java.dev.note.NoteField;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 灵宠全服数据
 *
 * @author ShenSL
 * @since 2023/8/24 23:08
 */
public class HolyPetSPO extends KvMongo {
    @NoteField("所有执行中的任务")
    public Map<String, HolyPetRoleMission> roleMissionMap;
    @NoteField("缓存日志")
    public Map<String, List<HolyPetAdventureLog>> cachedLogs;

    @Override
    public String getKeyPrefix() {
        return KvMongo.KEY_HOLY_PET;
    }

    @Override
    public void initialize() {
        super.initialize();
        if (roleMissionMap == null) {
            roleMissionMap = new HashMap<>();
        }
        if (cachedLogs == null) {
            cachedLogs = new HashMap<>();
        }
    }
}
